/**
 * 
 */
package com.googlecode.bestpaper.utils;

/**
 * @author xalinx at gmail dot com
 * @date Jan 29, 2010
 */
public class FileUtils {

	public static String getpostfix(String fname) {
		String postfix = null;
		if (fname == null)
			return "";
		int lastIndex = fname.lastIndexOf(".");
		if (lastIndex != -1 || lastIndex != fname.length() - 1) {
			postfix = fname.substring(lastIndex + 1);
		} else {
			return "";
		}
		return postfix;
	}
	
	public static boolean isAbsolutePath(String filename) {
		if(filename.startsWith("/")) {
			return true;
		}
		return false;
	}

}
